package com.uit.se6.mydiary.util;


public class UtilTime {
	/**
	 * @param year
	 *            "****"
	 * @param month
	 *            "**"
	 * @param date
	 *            "**"
	 * @return
	 */
	public static int serialize(String year, String month, String date) {
		int yearInt = Integer.parseInt(year);
		int monthInt = Integer.parseInt(month);
		int dateInt = Integer.parseInt(date);
		int result = yearInt * 10000 + monthInt * 100 + dateInt;
		return result;
	}

	public static int serialize(int year, int month, int date) {
		int result = year * 10000 + month * 100 + date;
		return result;
	}
}
